{% extends "../master.html" %}

{% block header %}
    {% include "../header.html" %}
{% endblock %}

{% block menu %}
    {% include "../wiki/menu_edit.html" %}
{% endblock %}

{% block page %}
    {% if admin %}
    <form class="form" action="/category/save" method="post">
    <div class="button">
        <h3>Title:</h3>
        <input name="title" value="{{ category.title }}" type="text" />
        <p>
            <input name="cancel" value="Cancel" type="submit" /> ||
            <input name="save" value="Save" type="submit" /> |
            <input name="new" value="New" type="submit" /> ||
            <input name="delete" value="Delete" type="submit" />
        </p>
        <input name="category_key" value="{{ category.key }}" type="hidden" />
        <input name="wiki_key" value="{{ wiki.key }}" type="hidden" />
        <input name="size_key" value="{{ size.key }}" type="hidden" />
        <input name="language_key" value="{{ language.key }}" type="hidden" />
    </div>
    </form>
    {% endif %}

    {% if admin %}
    <form class="form" action="/category/position" method="post">
    <div class="button">
        <h3>Position:</h3>
        <b>{{ category.position }}</b> ..
        <input name="up" value="Up" type="submit" /> |
        <input name="down" value="Down" type="submit" />
        <input name="category_key" value="{{ category.key }}" type="hidden" />
        <input name="wiki_key" value="{{ wiki.key }}" type="hidden" />
        <input name="size_key" value="{{ size.key }}" type="hidden" />
        <input name="language_key" value="{{ language.key }}" type="hidden" />
    </div>
    </form>
    {% endif %}
{% endblock %}

{% block footer %}
    {% include "../footer.html" %}
{% endblock %}
